<template>
	<div>
		<strong class="block-title">注单信息</strong>
		<el-row class="block-content">
			<el-col :span="9">注单号： {{ dataList.id || '-' }}</el-col>
			<el-col :span="9">
				三方订单号： {{ dataList.thirdOrderId || '-' }}
			</el-col>
			<el-col :span="6">
				游戏平台：
				<span>
					{{ $parent.gameType }}
				</span>
			</el-col>
			<el-col :span="9">
				彩种名称： {{ dataList.seriesName || '-' }}
			</el-col>
			<el-col :span="9">
				状态归类：
				{{ typeFilter(dataList.obBetStatus, 'betStatusType') }}
			</el-col>
			<el-col :span="6">期号： {{ dataList.ticketPlanNo || '-' }}</el-col>
			<el-col :span="9">模式： {{ dataList.betModel || '-' }}元</el-col>
			<el-col :span="9">赔率： {{ dataList.oddsValue || '-' }}</el-col>
			<el-col :span="6" class="tipsBox">
				<div class="tipsH">投注内容：</div>
				<div class="tipsC">
					<el-tooltip
						:content="dataList.playOptionName"
						placement="left-start"
					>
						<span>
							{{ dataList.playOptionName || '-' }}
						</span>
					</el-tooltip>
				</div>
			</el-col>
			<el-col :span="9" class="tipsBox">
				<div class="tipsH">判奖内容：</div>
				<div class="tipsC">
					<el-tooltip
						:content="dataList.judgeResultCn"
						placement="left-start"
					>
						<span>
							{{ dataList.judgeResultCn || '-' }}
						</span>
					</el-tooltip>
				</div>
			</el-col>
			<el-col :span="9">
				输赢金额：
				{{ decimalToFixed2(dataList.netAmount) }}
			</el-col>
			<el-col :span="6">
				投注终端：
				{{
					dataList.deviceType === '其他'
						? dataList.deviceType
						: typeFilter(dataList.deviceType, 'loginDeviceType')
				}}
			</el-col>
			<el-col :span="9">投注IP： {{ dataList.loginIp || '-' }}</el-col>
			<el-col :span="9">投注时间： {{ dataList.createAt || '-' }}</el-col>
			<el-col :span="6">结算时间： {{ dataList.netAt || '-' }}</el-col>
			<el-col :span="9">
				同步时间： {{ dataList.synchronizationTime || '-' }}
			</el-col>
		</el-row>

		<el-table
			border
			size="mini"
			class="small-size-table"
			:data="tableData"
			style="width: 100%"
			:header-cell-style="$parent.getRowStyle"
		>
			<el-table-column
				prop="playName"
				label="玩法名称"
				align="center"
			></el-table-column>
			<el-table-column
				prop="betCount"
				label="注数"
				align="center"
			></el-table-column>
			<el-table-column
				prop="betMultiple"
				label="倍数"
				align="center"
			></el-table-column>
			<el-table-column prop="betAmount" label="投注金额" align="center">
				<template slot-scope="scope">
					{{ decimalToFixed2(scope.row.betAmount) }}
				</template>
			</el-table-column>
			<el-table-column prop="betStatus" label="状态" align="center">
				<template slot-scope="scope">
					{{ scope.row.netAt || '-' }}
				</template>
			</el-table-column>
		</el-table>
	</div>
</template>

<script>
import list from '@/mixins/list'
export default {
	mixins: [list],
	props: {
		dataList: {
			type: Object,
			default: () => ({})
		}
	},
	data() {
		return {
			tableData: []
		}
	},
	mounted() {
		const res = {}
		res.playName = this.dataList.playName
		res.betCount = this.dataList.betCount
		res.betMultiple = this.dataList.betMultiple
		res.betAmount = this.dataList.betAmount
		res.betStatus = this.dataList.betStatus
		this.tableData.push(res)
	}
}
</script>

<style lang="scss" scoped>
.tipsBox {
	height: 30px;
	line-height: 30px;
	.tipsH {
		max-width: 100px;
		overflow: hidden;
		display: inline-block;
	}
	.tipsC {
		max-width: 140px;
		overflow: hidden;
		display: inline-block;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
}
</style>
